<include file="__PUBLIC__/header"/>
<link href="__PUBLIC__/bootstrap-switch.css" rel="stylesheet">

<body>

<div class="hd-menu-list">
    <ul>
        <li class="active"><a href="{|addon_url:index}">域名列表</a></li>
        <li><a href="{|addon_url:add}">添加域名</a></li>
    </ul>

<input class="hd-w200" type="text" placeholder="请输入域名..." value="" name="sou_ip">

<button class="hd-btn hd-btn-xm"  id="sou">搜索</button>

</div> 

<form action="{|addon_url:del}" method="post">
<table class="hd-table hd-table-list hd-form">
    <thead>
    <tr>
    <td class="hd-w30">
        <input type="checkbox" id="selectAllContent"/>
        </td>
        <td class="hd-w50">id</td>
        <td class="hd-w50">域名</td>
        <td class="hd-w50">公司名</td>
        <td CLASS="hd-w50">公司地址</td>
        <td class="hd-w50">电脑跳转</td>
        <td class="hd-w50">手机跳转</td>
        <td CLASS="hd-w50">开启状态</td>
    	<td CLASS="hd-w50">添加时间</td>
        <td class="hd-w60">操作</td>
    </tr>
    </thead>
  <tbody>
    <list from="$data" name="$d">
  
        <tr>
        
        <td><input type="checkbox" name="id[]" value="{$d.id}"/></td>
            <td>{$d.id}</td>
            <td>{$d.domain}</td>
            <td>{$d.webtitle}</td>
            <td>{$d.webaddress}</td>
            <td>{$d.nexturl}</td>
            <td>{$d.wapurl}</td>
            <td>
               <?php if ($d['status'] = 1) { echo "√";}else{echo "x";}?>

            </td>
            <td>{$d.time|date:'Y-m-d H:i:s',@@}</td>
            <td><a href="{|addon_url:'edit',array('id'=>$d['id'])}">修改 </a><a href="{|addon_url:'del',array('id'=>$d['id'])}"> 删除</a>
            </td>
        </tr>

    </list>
    </tbody>
    </table>
    <br>
    <input type="submit" class="hd-btn hd-btn-xm"  value="批量删除"/>
        </form>

<script type="text/javascript">
    //全选
            $("input#selectAllContent").click(function () {
                $("[type='checkbox']").attr("checked", $(this).attr("checked") == "checked");
            });

     $("#sou").click(function(){
          var sip = $("input[name=sou_ip]").val();
                            $.ajax({
                            url:"{|addon_url:sou}",
                            data:{sou_ip:sip},
                            dataType:"json",
                            success:function(ok){
                            $("tbody").html(ok);
                            }
               })
            })

           
          
</script>

  <script src="__PUBLIC__/bootstrap-switch.js"></script>
    <script>
    $(function(argument) {
      $('#sw').bootstrapSwitch();
        
    })


    </script>

</body>
</html>